#include <iostream>

// 代理模式:代理控制对其它对象的访问  房东 中介 人

class RentHouse
{
public:
    virtual void renthouse() = 0;
};

class LandLord : public RentHouse
{
public:
    void renthouse() override
    {
        std::cout << "租房\n";
    }
};

class intermediary
{
public:
    void RentHouse()
    {
        std::cout << "发布招租启示\n";
        std::cout << "带人看房\n";
        _landlord.renthouse();
        std::cout << "负责租后维修\n";
    }

private:
    LandLord _landlord;
};

int main()
{
    intermediary inter;
    inter.RentHouse();
    return 0;
}